package com.cswangdao.controller.admin;

import com.cswangdao.domain.dto.LogPageDTO;
import com.cswangdao.domain.model.MarketLog;
import com.cswangdao.result.PageResult;
import com.cswangdao.result.Result;
import com.cswangdao.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/admin/log")
@RestController
@Slf4j
public class AdminLogController {
    @Autowired
    private LogService logService;

    /**
     * @description: 分页查询日志信息
     * @param: request,response
     * @return: void
     */
   @GetMapping("list")
    public Result<PageResult<MarketLog>> list(LogPageDTO pageDTO)  {
       log.info("分页查询日志信息:{}", pageDTO);
       PageResult<MarketLog> pageResult = logService.pageQueryInfo(pageDTO);
       return Result.success(pageResult);
    }
}
